package com.gph.saviorframework.wf.service.impl;

import com.gph.saviorframework.wf.service.ActivitiVarsService;
import org.activiti.engine.RuntimeService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

public class ActivitiVarsServiceImpl implements ActivitiVarsService {

    @Autowired
    private RuntimeService runtimeService;

    public Map getAllVars(String executionId) {
        return runtimeService.getVariables(executionId);
    }

    public Object getVars(String executionId, String variableName) {
        return runtimeService.getVariable(executionId, variableName);
    }
}
